package cn.scw.project.facility.domain.netework.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 设备打印价格对象 fac_print_price_facility
 *
 * @author api
 * @date 2020-05-20
 */
@Data
@ApiModel("设备打印价格添加")
public class FacPrintPriceFacilityFindReq {

    @ApiModelProperty("设备编码")
    private String facilityCode;

    @ApiModelProperty("打印文件")
    private String printfile;

    @ApiModelProperty("打印类型")
    private String type;

    @ApiModelProperty("是否彩色")
    private Boolean isColours;

    @ApiModelProperty("是否双面")
    private Boolean isDoubleFaced;

    @ApiModelProperty(value = "打印张数", hidden = true)
    private Integer paperNumber;

    @ApiModelProperty("打印份数")
    private Integer count;

    @ApiModelProperty("打印开始页(文档打印时填写)")
    private Integer startPage;

    @ApiModelProperty("打印结束页(文档打印时填写)")
    private Integer endPage;

    public void initData() {
        if (startPage != null && endPage != null)
            this.paperNumber = (endPage - startPage + 1) * count;
        else
            this.paperNumber = count;
    }


}
